package actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import db.DbException;
import forms.formAddressForResdient;
import forms.formName;

public class addressForResdientAction extends Action {
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws DbException {

		// Cast the form
		formAddressForResdient fAddress = (formAddressForResdient) form;

		// Insert the student
		// StudentModel.insertStudent(iForm);
		request.setAttribute("city", fAddress.getCity());
		request.setAttribute("street", fAddress.getStreet());
		request.setAttribute("zipCode", fAddress.getZipCode());
		request.setAttribute("number", fAddress.getPhoneNumber());
		request.setAttribute("areaCode", fAddress.getAreaCode());
		request.setAttribute("state", fAddress.getState());
		return mapping.findForward("success");
	}
}
